<?php

/**
 * 违规小类仓库
 * @author wangwx 2015-5-12
 */
namespace common\repositories\myhtsq;
use common\repositories\BaseRepository;
use common\support\StringHelper;
use common\entities\myhtsq\ViolatedLittlerCategoryEntity;

class ViolatedLittlerCategoryRepository extends BaseRepository{
	
	/**
	 * 构造方法
	 * @param unknown $config (optional)
	 */
	public function __construct($config = [])
	{
		parent::__construct($config);
	}
	
    /**
     * 合同违规小类列表
     * @return array
     */
    public static function getViolatedLittlerCategoryListForDdl($categoryId) {
        return ViolatedLittlerCategoryEntity::find()
                ->select('violated_littler_category_id,littler_category_name,order')                
                ->where(['violated_category_id'=>$categoryId])
                ->orderBy(['order' => SORT_ASC])->all();
    }		
	
}